<?php
require_once '../application/library/config/gcConfigRegistry.php';
require_once '../application/library/controller/gcLBasicAction.php';
require_once '../application/modules/common/services/common_services_categoryTagService.php';
require_once '../application/library/exception/gcExceptionDealer.php';

/**
 * categoryTagController
 * goods
 * @author    Suda
 * @version   1.0
 */
class common_categoryTagController extends gcLBasicAction{
    private $objCategoryTagService;

    /**
     * 初期表示
     * indexAction
     * @throws gcException
     * @return
     */
    public function indexAction(){
        gcExceptionDealer::throwGcException();
    }

    public function setsecondcategoryAction() {
        try{
            $strFirstCATGId = $this->getParam("firstCATGId");
            $this->objCategoryTagService = new common_services_categoryTagService();
            $arrSecondCATG = $this->objCategoryTagService->pbGetGoodsSecondCategory($strFirstCATGId);
            $output = array("arrSecondCATG"=>$arrSecondCATG);
            jsonHelper::outPutJson($output);
        }catch (Exception $e){
            gcExceptionDealer::setException($e);
        }
    }

}